AI Realtime Voice GuideConfigure API key, voice, and role; start/stop realtime voice dialog
Back to navigation guide: Navigation User Guide · AI Realtime Voice · 《导览功能使用指南》· AI实时语音 · Chinese full guide: 《AI实时语音说明》
Compared with standard voice dialog, it offers faster response, barge-in, and natural tone for more human-like conversation. After wake-up, motion is smoother: handshake, forward / backward, turn left / right, and various performance actions. It also supports mixed multilingual dialog without stopping to switch language. With camera streaming on, it can analyze the scene ahead in real time.
This feature is independent from navigation-page Voice Dialog. Switch the model at the top of the page: Alibaba Cloud (Qwen) or Doubao in China, OpenAI (GPT) outside China. Qwen uses an Alibaba Cloud Model Studio knowledge base; OpenAI uses a ChatGPT console knowledge base. Do not mix those keys or knowledge bases. Doubao keys, the search key, and voice are in Doubao. Switching models stops the current realtime voice first. In China, Qwen has been upgraded from 3.5 to 3.8, with lower cost, and it can speak Mongolian. Key setup is in sections 9, 10, and 11. Live Assistant is available on Qwen only; see section 5. Online notes for the knowledge base and voice settings: https://doc.cdxfyun.com/.
1. Overview
| Item | Description |
|---|---|
| Key | API Key (enter in Settings dialog) |
| Configurable | API Key, voice, role prompt, knowledge base, live assistant (Qwen only), camera stream switch |
| Model | On the same page, switch to Alibaba Cloud (Qwen), OpenAI (GPT), or Doubao. Qwen and GPT knowledge-base fields follow the model. Do not mix those keys. Configure Doubao in section 11. Switching stops the current realtime voice first. |
| Tour link | With realtime voice running and navigation localized, say a tour name or keyword to start that tour. |
| Echo cancellation | Wireless-microphone echo cancellation also applies here and is on by default at startup. The robot’s own voice will not interrupt the conversation. |
| Control | Start / Stop realtime voice service |
| Dialogue display | Latest Question / Answer shown on the page in real time |
Note: Keep the robot online with a working network. An invalid API Key or unavailable service may cause start failure or broken dialog.
2. Entry & Page Layout
- Entry: On the navigation home page, tap AI Realtime Voice to open this feature.
- Page layout:
- Top status: Running / Stopped, camera On/Off, and the Model menu (Qwen / OpenAI / Doubao)
- Latest dialogue: current question and AI answer
- Control area: Start, Stop, Settings (role, key, voice), Knowledge Base, Live Assistant (Qwen only)
2.1 Switch model
- On the status card, tap Model.
- Choose Alibaba Cloud (Qwen) or Doubao in China, or OpenAI (GPT) outside China.
- Confirm. The running realtime voice stops first, then the matching model is used.
- After switching to Qwen or GPT, enter that side’s API key under Settings, and that side’s knowledge base under Knowledge Base. Do not put a Qwen key on OpenAI, or an OpenAI key on Qwen.
- After switching to Doubao, open Settings and fill in the API key, search key, voice, and role prompt as in section 11. Then save and start.
Networks in mainland China usually cannot reach OpenAI. Use Qwen or Doubao there.
3. Configure API Key / Voice / Role
Complete configuration before first use. Tap Settings in the control area.
- Model is Alibaba Cloud (Qwen): enter a Qwen API Key. See China: Qwen API Key.
- Model is OpenAI (GPT): enter an OpenAI API Key. See Outside China: OpenAI API Key. The key must match the selected model.
- Model is Doubao: enter the Doubao API key. Add the search key for built-in web search. Voices are only vivi, Xiaohe, Yunzhou, and Xiaotian; Xiaohe is the default. See Doubao.
3.1 API Key
- Enter a valid API Key in the API Key field.
- Use the eye icon to show/hide the key.
- Tap Save for changes to take effect.
Keep the key private; do not share it with unrelated people.
3.2 Voice
- Tap the Voice row to open the voice picker.
- Select a voice (default recommendation: Tina).
- Confirm, return to Settings, then tap Save.
Chinese, dialects, and multilingual voices (e.g. Sichuan, Cantonese, English) are supported.
3.3 Role prompt
- Enter a role prompt in the Role prompt field.
- Recommended: robot identity, reply style, and whether to prefer action/move tools.
- Tap Save.
Example (adapt to your site):
You are a humanoid robot assistant of Chengdu Xinfengyun Technology Co., Ltd. Your name is Xiao Feng. You can control your own movement and performance actions via tools. Rules: 1. When the user asks what you can do or which actions are available, you must call list_actions. 2. When the user asks to move forward/backward, turn left/right, or stop, you must call the corresponding move tool — do not only agree verbally. 3. When the user asks for wave, salute, dance, heart gesture, handshake, etc., you must call execute_action. 4. Keep answers concise and friendly in English. After an action, confirm in one short sentence.
4. Knowledge Base
This chapter is for company documents on Qwen and GPT. For Doubao weather, news, and the current time, enter the search key under Settings. Steps are in section 11.
The knowledge base lets realtime voice answer from your documents instead of only the model’s built-in knowledge. Open it from Knowledge Base in the control area. After saving, stop realtime voice and start it again before the new base is used.
4.1 Pick the model first
| Who | Model on the page | Dialog key | Knowledge base |
|---|---|---|---|
| Users in China | Alibaba Cloud (Qwen) | Alibaba Cloud Model Studio / Qwen API Key | Alibaba Cloud knowledge base. The page asks for Workspace, Agent ID, Host, and a tool definition. |
| Users outside China | OpenAI (GPT) | OpenAI API Key | OpenAI Vector Store. The page asks for a knowledge ID and a description. |
| Users in China | Doubao | Volcengine Doubao Speech API Key, plus an optional Search Key | Weather, news, and the current time use the search key. Steps are in section 11. |
Note: Switch between Qwen and GPT on this page and the knowledge-base form changes with it. Networks in mainland China usually cannot reach OpenAI, so choose Qwen or Doubao there. Do not paste an OpenAI key or vector store ID into Qwen, or the three Qwen IDs into OpenAI. Doubao keys are separate; see Doubao.
4.2 Alibaba Cloud knowledge base (Qwen selected)
Switch the model to Alibaba Cloud (Qwen), then open Knowledge Base. Fill in the four fields below and tap Save. Workspace, Agent ID, and Host all come from the Alibaba Cloud Model Studio console, and they must use the same region as the API Key. Use China (Beijing).
| Field | What to enter | Example |
|---|---|---|
| Workspace | Business workspace ID (workspace_id) | llm-xxxxxxxx |
| Agent ID | Application ID of a published knowledge Q&A service | aid-xxxxxxxx |
| Host | Call hostname for that workspace, without https:// |
llm-xxxxxxxx.cn-beijing.maas.aliyuncs.com |
| Tool definition | What the documents cover, and when the model must search them first | See the example below |
Get the three IDs in Model Studio:
- Sign in to the Model Studio console and select China (Beijing). Create the API Key in section 9 in that same region.
- Workspace: open the current workspace details at the bottom-left of the console, or open workspace management, and copy the workspace ID. Docs: Manage workspaces.
- Create a knowledge base, upload scripts or product documents, and wait until parsing finishes. Docs: Create and use a knowledge base.
- Create and publish a knowledge Q&A service, and attach that knowledge base. Copy the application ID into Agent ID. An unpublished service cannot be called. Docs: Knowledge Q&A.
- Host for Beijing is
{workspaceId}.cn-beijing.maas.aliyuncs.com. If the workspace ID isllm-abc123, the host isllm-abc123.cn-beijing.maas.aliyuncs.com. - Write the tool definition and save. This text decides when the model calls
knowledge_search. Update it whenever you switch knowledge bases.
Tool definition example (rewrite it for your documents):
Search this venue knowledge base (exhibit introductions, product specs, visit routes). When the user asks about exhibits, the company, or on-site explanations, you must call this tool first and must not answer from memory. Do not use it for robot motion, navigation, weather, news, or the current time.
Timeout, result count, and minimum score are not edited on this page. Existing values in the config file are kept. If loading fails, the page uses defaults — check that the robot is online and open the dialog again.
4.3 OpenAI knowledge base (GPT selected)
Switch the model to OpenAI (GPT), then tap Knowledge Base. The dialog has two fields: Knowledge ID and Description. The ID is required. After you save, timeout and result-count settings stay as they are. The new base is used the next time realtime voice starts.
- Finish Outside China: OpenAI API Key, switch the model to OpenAI (GPT), and save that key under Settings.
- Sign in at OpenAI Platform and open Vector stores:
- Create a vector store and name it, for example “Venue guide”.
- Upload PDF, Word, or TXT files and wait until the status is Completed. Do not save the ID to the robot while files are still processing.
- Copy the vector store ID. It usually starts with
vs_. Paste it into Knowledge ID. - In Description, state what the files cover and when
knowledge_searchmust be called. Change this text when you switch stores, or the model will not know when to search. - Save, then stop and start realtime voice.
Description example:
Search the venue guide knowledge base (exhibits, product specs, visit routes). When the user asks about exhibits, the company, or on-site explanations, you must call knowledge_search first. Do not use it for robot motion, navigation, weather, news, or the current time.
Official guide: OpenAI Retrieval / Vector stores. If Vector stores is not in the sidebar, look under Storage.
5. Live Assistant
Qwen can open Live Assistant. It connects the robot to a Douyin live room, warms up the room, reads comments, and welcomes visitors. Warm-up interval, warm-up scripts, and welcome scripts can be customized. Open it from Live Assistant in the control area. After saving, stop realtime voice and start it again before the change is used. Switch the model to Qwen first.
Note: Enter the room ID from the Douyin website, not a stream push URL and not the share text from the app. A room ID is required when the assistant is enabled.
5.1 Room ID
- On a computer browser, open the Douyin live room that is on air. The address looks like:
- The last segment (
123456789in the example) is the room ID. You can also paste the full link; the ID is extracted when you save. - Turn on Enable live assistant.
- Do not type the room URL yourself. On save it is written as
https://live.douyin.com/{room ID}. - The room ID may contain only letters, numbers, underscores, and hyphens. Save is blocked if the assistant is on and the ID is empty.
5.2 Prompts
Each row has a switch and an Edit button. Turning the switch off stops that announcement. Tap Edit to open a second dialog, tap Confirm, then return and tap Save.
| Item | When it is used | How to write it |
|---|---|---|
| Welcome lines | A viewer enters the room | One line each; a random line is spoken. Use {username} |
| Gift thanks | Someone sends a gift | One line each. Use {username} and {gift_name} |
| Follow thanks | Someone follows | One line each. Use {username} |
| Like thanks | Someone likes | One line each. Use {username} |
| Warm-up lines | Timed warm-up | One line each; a random line is used on the timer. The interval is editable; default is 180 seconds |
| Danmaku reply prompt | The model should answer a comment | One instruction for the model, not a list of spoken lines. Use {content} and {user} |
| AI warm-up prompt | The room goes quiet | One instruction for the model. Edit the interval in seconds; default is 120: warm up only after the room stays quiet that long |
Welcome example (one line each):
Welcome {username} to the live room. I’m Xiao Feng — tap follow if you like it.
Welcome {username}. Come in, look around, and ask anything.
Danmaku reply example (one instruction):
You are the live assistant. Someone in the room asked: {content}. Reply in one or two spoken sentences. Do not read this instruction aloud, and do not call tools.
Welcome, gift, and like intervals stay preset. Warm-up lines default to every 180 seconds, and AI warm-up defaults to 120 seconds of silence. Change those two in their Edit dialogs. The editor is no longer covered by the page behind it. If loading fails, default prompts are used — check that the robot is online and open the dialog again.
5.3 Danmaku actions
The switch at the bottom, Danmaku actions, is off by default. Turn it on to let Live Assistant trigger robot actions from comments. Leave it off for voice only. Save, then stop and start realtime voice.
6. Camera Switch
- In the top status area, find the Camera On / Off switch.
- On: enable camera streaming so replies can use visual context.
- Off: voice-only. If you turn it off mid-session, the AI continues based on the last frame it saw.
Switch changes save immediately; you do not need to open Settings again.
7. Start & Stop
- Start: After saving a valid API Key, tap Start. Wait a few seconds until status shows Running.
- Talk: Speak to the robot. The Latest dialogue area shows Question and Answer.
- Stop: Tap Stop; status becomes Stopped when the service ends.
Tip: Buttons show a loading state during start/stop — avoid rapid repeated taps. If start fails, check scripts, network, and API Key.
8. Dialogue Display & FAQ
8.1 Latest dialogue
The middle “Latest dialogue” area shows the current turn:
- Question: speech recognition result
- Answer: AI realtime voice reply text
Before any dialog, it shows “No dialogue yet”.
8.2 FAQ
| Symptom | Likely cause & fix |
|---|---|
| Start failed | Check API Key is filled and saved; robot online; network OK; check backend logs if needed. |
| Running but no reply | Check mic/speaker; confirm voice and role were saved; see whether Latest dialogue shows recognized text. |
| Cannot run actions / move | Ensure the role prompt requires calling the matching tools; confirm motion modules are available. |
| Conflict with navigation Voice Dialog | They are independent. Prefer running only one voice channel at a time to avoid mic contention. |
| Answers still use the old documents | Stop and start again after saving. Also check that the tool definition or description says when to search. For Qwen, the Q&A service must be published, and Workspace, Agent ID, and Host must belong to the same Beijing workspace. Confirm the selected model is the side you configured. |
| Knowledge Base will not open or save | Confirm the robot is online. If Qwen fails to load, it falls back to defaults — check the three IDs and save again. For OpenAI, the ID must start with vs_ and the vector store must be Completed. |
| The old key is still used after a model switch | A switch stops realtime voice first. Save that side’s key under Settings and its documents under Knowledge Base, then start again. |
| Saying a tour name does nothing | Realtime voice must be running, navigation must be started and localized, and the tour item must be enabled. The keyword must match the item. |
| Doubao weather or news is not live | Copy the fusion-search API key from Volcengine into Search key (search_api_key), save, and start again. Steps are in 11.3. An empty key leaves web search off for that session. |
| The robot interrupts itself | Wireless-mic echo cancellation is on by default at startup for both standard voice and realtime voice. If it still happens, turn on Enable AEC before interrupt in Voice Settings on the navigation page. |
| Live Assistant will not save | A room ID is required when the assistant is enabled. It may contain only letters, numbers, underscores, and hyphens. If you pasted a full link, it must contain live.douyin.com/ and the room ID. |
| New prompts are not used on air | After editing, tap Confirm, then Save. Stop and start realtime voice again. |
| No welcome or thanks in the room | Turn on Enable live assistant, and also turn on the switch for that row. The room ID must match the room that is live now. |
9. China: Qwen API Key
Use this flow when the model is Alibaba Cloud (Qwen). The dialog key is an Alibaba Cloud Model Studio (Qwen) API Key, and the knowledge base is a Model Studio knowledge base on the same account (see Knowledge Base). In China, Qwen has been upgraded from 3.5 to 3.8: lower cost, steadier answers, and it can speak Mongolian. Follow the steps below.
Step 1: Register an Alibaba Cloud account and complete identity verification
- Open the Alibaba Cloud registration page:
- Complete registration as prompted.
- After login, complete identity verification (personal or enterprise). Without verification, related services usually cannot be enabled. Verification entry:
Step 2: Create an API Key
- Open the Alibaba Cloud Model Studio (Bailian) console API Key page:
- On first visit, enable Bailian / model calling and accept the agreements.
- Select region (top-right). Recommended: China (Beijing).
- Open API Key management and click Create API Key.
- In the dialog, suggested settings:
- Workspace: default workspace
- Description: optional, e.g. “AI Realtime Voice”
- Permissions: recommend “All”
- After confirm, copy and store the full key immediately (usually starts with
sk-). The full plaintext is usually not shown again after closing; if lost, reset or create a new one.
Warning: An API Key is a credential. Do not leak it, share screenshots, or commit it to public repos. Paste and save it under AI Realtime Voice → Settings in this app.
Official help: How to get an API Key (Alibaba Cloud Help Center). After you have the key, configure the Alibaba Cloud knowledge base in section 4.
10. Outside China: OpenAI API Key
Use this flow when the model is OpenAI (GPT). Both the dialog key and the knowledge base come from OpenAI: paste the key under Settings, and paste the vector store ID under Knowledge Base (see 4.3 OpenAI knowledge base). Networks in mainland China usually cannot complete this signup or call the API — use the Qwen key in section 9 instead.
Step 1: Create an OpenAI Platform account
- Open the signup page (or sign in at platform.openai.com if you already have an account):
- Register with email, or with Google, Microsoft, or Apple.
- Verify your email. If the page asks for a phone number, use one that can receive SMS or a call.
- The first login creates an Organization. Keep the key and the vector store in that same organization.
Step 2: Add billing and credits
A key with no credit balance cannot run realtime voice or knowledge search. Add a payment method and prepaid credit first.
- Open Billing and add a credit card or another method the page accepts.
- Add prepaid credit. Realtime voice and vector search are both charged from that balance.
- Set a usage limit if you want to cap unexpected spend. Current prices are on Pricing.
Note: This is the OpenAI API bill, not a ChatGPT Plus subscription. A ChatGPT web subscription does not replace this API key.
Step 3: Create an API key
- Click Create new secret key.
- Suggested settings:
- Name: for example
AI Realtime Voice - Project: the current project (Default is fine). Create the vector store in the same project, or this key cannot read it.
- Permissions: All. If you use a restricted key, it still needs model calls, files, and vector stores.
- Name: for example
- The full secret is shown only once. Copy it immediately. It usually starts with
sk-orsk-proj-. After you close the dialog it cannot be viewed again; create a new key if it is lost. - Open AI Realtime Voice, switch the model to OpenAI (GPT), open Settings, paste the key, and save.
- Stop and start realtime voice so the new key is used.
Warning: The API key is a credential. Do not leak it, share screenshots, or commit it to a public repository. Revoke unused keys on the API keys page.
Official page: API keys. To create a knowledge base and paste the vs_ ID, see 4.3 OpenAI knowledge base.
11. Doubao
Follow this section when the model is Doubao. Doubao uses Volcengine full-duplex realtime voice. It can listen and speak at the same time, barge in, run actions, movement, and navigation, and sing on request. Fill in the search key before asking for weather, news, or the current time.
11.1 Configure and start
- Set the model to Doubao. A running session stops first.
- Open Settings.
- Enter the API key. How to get it is in 11.2. This is the Volcengine Doubao Speech API key, not an App ID and not an access token.
- To answer weather, news, or the time, enter the search key (
search_api_key). How to get it is in 11.3. You can leave it empty and still start a conversation; live public facts will wait until the key is saved. - Choose a voice. The choices are vivi, Xiaohe, Yunzhou, and Xiaotian. The default is Xiaohe.
- Fill in the role prompt. The Chinese Xiaofeng prompt can stay. State that it should call action, movement, and navigation.
- Tap Save, then Start.
Note: The API key and the search key are stored for Doubao. If realtime voice is already running, stop it and start again after saving.
11.2 Get the API key
Enable end-to-end realtime voice on Volcengine and copy the API key.
- Sign in to Volcengine with the company account. Register first if you do not have one.
- Open Doubao Speech and enable end-to-end realtime voice (full duplex). Product notes: full-duplex documentation.
- Create an app and copy the API Key. Paste it into API key on this page. Do not paste an App ID or an access token.
- Return to AI Realtime Voice, keep the model on Doubao, paste the key into API key, save, and start again. Continue below if you also need web search.
If the console shows a key only once, copy it immediately. Do not share screenshots or put the key in a public file.
11.3 Get the search key (search_api_key)
The Search key field in Settings is search_api_key. It is the Volcengine fusion information search API key, and it lets Doubao answer weather, news, and the current time. Do not paste the Doubao Speech API key here.
- Sign in with the same Volcengine company account used for Doubao Speech.
- Open the fusion-search API key page above. If the service is not enabled, enable fusion information search first.
- Create an API key, or copy an existing one.
- Return to AI Realtime Voice, keep the model on Doubao, open Settings, and paste it into Search key.
- Tap Save. If realtime voice is already running, stop it and start again so this session can search.
Note: An empty search key still lets the dialog start. That session just will not look up live information. Do not share screenshots of either key, and do not put them in a public file.
11.4 Singing, actions, and navigation
- Singing: after startup, ask for a song and Doubao sings it.
- Actions and movement: say an action name, or say walk forward, walk back, turn left, or turn right. Asking what it can do lists up to 100 actions.
- Navigation: with realtime voice running and navigation localized, say a tour name or keyword to start that tour.